package bist.believeinstep.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import bist.believeinstep.domain.TravelingArticleImage;

public class TravelingArticleImageMapper implements RowMapper<TravelingArticleImage>{
	public TravelingArticleImage mapRow(ResultSet rs, int rowNum) throws SQLException{
		TravelingArticleImage travelingArticleImage = new TravelingArticleImage();
			
		travelingArticleImage.setId(rs.getInt("id"));
		travelingArticleImage.setTravelingArticleId(rs.getInt("bist_traveling_articles_id"));
		travelingArticleImage.setImageId(rs.getInt("bist_images_id"));
		travelingArticleImage.setCreated(rs.getTimestamp("created_date"));
		travelingArticleImage.setModified(rs.getTimestamp("modified_date"));
		travelingArticleImage.setCreatedBy(rs.getString("created_by"));
		travelingArticleImage.setModifiedBy(rs.getString("modified_by"));
		
		return travelingArticleImage;
	}
}
